package com.xjzd.std.generic;

import com.alibaba.fastjson2.JSON;

import java.util.ArrayList;
import java.util.List;

public class GenericDemo {

    public static void main(String[] args) {
        List<String> list = new ArrayList<>();
        List<Integer> list1 = new ArrayList<>();

        System.out.println(list.getClass() == list1.getClass());

        String s = "['a','b','c']";
        // 泛型擦除，这句执行成功
        List<Byte> list2 = JSON.parseObject(s, List.class);
        System.out.println(list2.get(0) + 1);
    }
}
